<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="sf" uri="http://www.springframework.org/tags/form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>齐重后台管理系统</title>
<link rel=stylesheet type=text/css
	href="<%=request.getContextPath()%>/resources/css/backstage/main.css" />
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath()%>/resources/css/admin/main.css" />
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath()%>/resources/js/base/jquery.ui.all.css" />
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath()%>/resources/css/admin/article.css" />
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath()%>/resources/css/validate/main.css" />
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath()%>/resources/css/zTree/zTreeStyle.css" />
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath()%>/resources/js/core/jquery.cms.keywordinput.css" />
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resources/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resources/js/core/jquery.cms.keywordinput.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resources/js/tree/jquery.ztree.core-3.5.min.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resources/js/core/jquery.cms.core.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resources/js/ui/jquery-ui-1.10.0.custom.min.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resources/js/i18n/jquery.ui.datepicker-zh-CN.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resources/js/admin/main.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resources/js/jquery.validate.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resources/js/core/jquery.cms.validate.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/dwr/engine.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/dwr/interface/dwrService.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resources/js/admin/topicAdd.js"></script>
<script type="text/javascript" charset="utf-8"
	src="<%=request.getContextPath()%>/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8"
	src="<%=request.getContextPath()%>/ueditor/ueditor.all.min.js"></script>
<LINK rel=stylesheet
	href="<%=request.getContextPath()%>/ueditor/themes/default/css/ueditor.css">
</head>
<body>
	<input type="hidden" id="sid" value="<%=session.getId()%>" />
	<div id="menuContent" class="menuContent"
		style="display: none; position: absolute; background: #eee; z-index: 999; border: 1px solid #999">
		<ul id="mytree" class="ztree" style="margin-top: 0;"></ul>
	</div>
	<div id="container">
		<jsp:include page="/jsp/admin/top.jsp"></jsp:include>
		<div id="contents">
			<input type="hidden" id="ctx" value="<%=request.getContextPath()%>" />
			<sf:form method="post" modelAttribute="topicDto" id="addForm">
				<table width="980" cellspacing="0" cellPadding="0" id="addTable">
					<tr>
						<td class="rightTd" width="120px">文章标题:</td>
						<td class="leftTd"><sf:input path="title" size="80" />
							<sf:errors cssClass="errorContainer" path="title" /></td>
					</tr>
					<tr>
						<td class="rightTd" width="120px">连接名称:</td>
						<td class="leftTd"><sf:input path="linkName" size="80" />
					</tr>
					<tr>
						<td class="rightTd" width="120px">连接地址:</td>
						<td class="leftTd"><sf:input path="link" size="80" />
					</tr>
					<tr>
						<td class="rightTd">文章栏目:</td>
						<td class="leftTd"><input type="text" readonly="readonly"
							name="cname" id="cname" value="${cname}" /> <input type="text"
							readonly="readonly" id="cid" name="cid" value="${topicDto.cid }" />
						<sf:errors cssClass="errorContainer" path="cid" /></td>
					</tr>
					<c:choose>
						<c:when test="${isAudit||isAdmin }">
							<tr>
								<td class="rightTd">文章状态:</td>
								<td class="leftTd"><sf:radiobutton path="status" value="0" />未发布
									<sf:radiobutton path="status" value="1" />已发布</td>
							</tr>
						</c:when>
						<c:otherwise>
							<sf:hidden path="status" />
						</c:otherwise>
					</c:choose>
					<tr>
						<td class="rightTd">是否推荐该文章:</td>
						<td class="leftTd"><sf:radiobutton path="recommend" value="0" />不推荐
							<sf:radiobutton path="recommend" value="1" />推荐</td>
					</tr>
					<tr>
						<td class="rightTd">发布时间:</td>
						<td class="leftTd"><sf:input path="publishDate" /></td>
					</tr>
					<%-- <tr>
						<td class="rightTd">文章关键字:</td>
						<td class="leftTd">
							<div id="keyword-exists">
								<c:forEach items="${keywords }" var="k">
									<span>${k }</span>
								</c:forEach>
							</div> <sf:input path="keyword" />
						</td>
					</tr> --%>
					<tr>
						<td colspan="2">文章内容 前台显示宽度为：766px</td>
					</tr>
					<tr>
						<td colspan="2"><sf:textarea id="myEditor" path="content"
								style="width:960px; height:300px;" /> <script
								type="text/javascript">
								var ue = UE.getEditor('myEditor', {
									autoHeightEnabled : false,
									autoFloatEnabled : true
								});
								</script></td>
					</tr>
				<%-- 	<tr>
						<td colspan="2">文章摘要</td>
					</tr>
					<tr>
						<td colspan="2"><sf:textarea path="summary" rows="5"
								cols="108" /></td>
					</tr> --%>
				</table>
				<div class="subpos">
					<input type="button" id="addBtn" value="更新文章" />
				</div>
				<div class="respos">
					<input type="reset" id="resetBtn" />
				</div>
			</sf:form>
		</div>
	</div>
</body>
</html>